import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
// 解决重复点击路由报错的BUG
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
	return originalPush.call(this, location).catch((err) => err)
}
export default new Router({
	routes: [
		// 对比分析页面
		{
			path: "/",
			name: "index",
			component: () => import("@/views/Home/index.vue"),
		},
		{
			path: "/fenxi",
			name: "fenxi",
			component: () => import("@/views/earlyWarning/statistics.vue"),
		},
		// 正极换流阀子模块状态 -  负极换流阀子模块状态  内水冷状态 内水冷状态
		{
			path: "/earlyWarning",
			name: "earlyWarning",
			component: () => import("@/views/earlyWarning/earlyWarning.vue"),
		},
		{
			path: "/zhongdu",
			name: "zhongdu",
			component: () => import("@/views/earlyWarning/earlyWarning.vue"),
		},
		{
			path: "/kangba",
			name: "kangba",
			component: () => import("@/views/kangbaShishi/index.vue"),
		},
		// // 中都换流站
		// {
		// 	path: "/zhongduPage",
		// 	name: "zhongduPage",
		// 	component: () => import("@/views/zhongduPage/index.vue"),
		// },
		// 历史状态分析
		{
			path: "/historyState",
			name: "historyState",
			component: () => import("@/views/earlyWarning/components/historyState.vue"),
		},
		// 康巴历史数据
		{
			path: "/kangbaHistory",
			name: "kangbaHistory",
			component: () => import("@/views/KangbaHistory/index.vue"),
		},
		// 中都历史数据
		{
			path: "/zhongduHistory",
			name: "zhongduHistory",
			component: () => import("@/views/zhongduHistory/index.vue"),
		},
		// 告警历史
		{
			path: "/alarmHistory",
			name: "alarmHistory",
			component: () => import("@/views/AlarmHistory/index.vue"),
		},








		// 统计
		{
			path: "/test",
			name: "Test",
			component: () => import("@/views/test.vue"),
		},
		{
			path: "/early",
			name: "Early",
			component: () => import("@/views/earlyWarning/index.vue"),
		},
		// 故障案例库

		{
			path: "/earlyWarning/add",
			name: "add",
			component: () => import("@/views/earlyWarning/Add.vue"),
		},

		//数据源维护
		{
			path: "/dataSourceMaintain",
			name: "dataSourceMaintain",
			component: () => import("@/views/systemMaintain/dataSourceMaintain/Index.vue"),
		},
		//测点维护
		{
			path: "/pointMaintain",
			name: "pointMaintain",
			component: () => import("@/views/systemMaintain/pointMaintain/Index.vue"),
		},
		{
			path: "/pointMaintain/evaluate",
			name: "evaluate",
			component: () => import("@/views/systemMaintain/pointMaintain/components/Evaluate/index.vue"),
		},
		{
			path: "/pointMaintain/manage",
			name: "manage",
			component: () => import("@/views/systemMaintain/pointMaintain/components/Manage/index.vue"),
		},
		{
			path: "/pointMaintain/manage/managePage",
			name: "managePage",
			component: () => import("@/views/systemMaintain/pointMaintain/components/Manage/managePage.vue"),
		},
		{
			path: "/pointMaintain/manage/sonModule", // 换流站添加
			name: "sonModule",
			component: () => import("@/views/systemMaintain/pointMaintain/components/Manage/sonModule.vue"),
		},
		//录波解析
		{
			path: "/faultDiagnosis",
			name: "faultDiagnosis",
			component: () => import("@/views/faultDiagnosis/index.vue"),
		},
		// 状态预测
		{
			path: "/statusPredict",
			name: "statusPredict",
			component: () => import("@/views/statusPredict/Index.vue")
		},
		{
			path: "/statusPredict/detail",
			name: "detail",
			component: () => import("@/views/statusPredict/detail.vue")
		}
	],
});
